package ink.onei.production.service.impl;

import ink.onei.production.entity.Dept;
import ink.onei.production.entity.Staff;
import ink.onei.production.mapper.IDepartmentMapper;
import ink.onei.production.service.IDepartmentService;
import ink.onei.production.vo.StaffAndDeptVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: dang
 * @Description: TODO
 * @Date: 2023/12/27 14:33 星期三
 */
@Service
public class DepartmentServiceImpl implements IDepartmentService {
    @Autowired
    IDepartmentMapper departmentMapper;

    @Override
    public List<Dept> getDeptAll() {
        return departmentMapper.getDeptAll();
    }

    @Override
    public List<StaffAndDeptVO> getStaffAll() {
        return departmentMapper.getStaffAll();
    }

    @Override
    public Dept getDeptById(Integer id) {
        return departmentMapper.getDeptById(id);
    }

    @Override
    public Integer addDept(Dept dept) {
        return departmentMapper.addDept(dept);
    }

    @Override
    public Integer DelDeptById(Integer id) {
        return departmentMapper.DelDeptById(id);
    }

    @Override
    public Integer EditDeptById(Dept dept) {
        return departmentMapper.EditDeptById(dept);
    }

    @Override
    public List<Dept> deptSearch(Dept dept) {
        return departmentMapper.deptSearch(dept);
    }

    @Override
    public Integer deptBatch(List<Dept> deptList) {
        return departmentMapper.deptBatch(deptList);
    }

    @Override
    public Integer EditStaffById(Staff staff) {
        return departmentMapper.EditStaffById(staff);
    }
}
